#!/usr/bin/env ruby

require 'mail'

class Mailsend
  
  attr_accessor :mail
  
    def initialize
      smtp = { :address => 'mail.intropro.com.ua',
	      :port => 25,
	      :domain => 'mail.intropro.com.ua',
	      :user_name => 'vkorzh',
	      :password => 'vkorzh75',
	      :authentication => 'plain',
	      :enable_starttls_auto => true
	    }
      Mail.defaults { delivery_method :smtp, smtp }
      @mail=Mail.new do
      from 'vkorzh@intropro.com.ua'
      to 'vkorzh@intropro.com.ua'
      subject 'subject'
      body 'body'
      end
    end

    def send
      @mail.deliver
    end

end